package com.service;

import com.entity.Category;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CategoryService {
    void insertCategory(Category category);
    void deleteCategoryById(Integer id);
    void updateCategory(Category category);
    Category selectCategoryById(Integer id);
    Category selectCategoryByName(String name);
    List<Category> selectCategory();
    PageInfo<Category> selectPageCategory(@Param("pageNum")Integer pageNum,
                                          @Param("pageSize")Integer pageSize);
    List<Category> selectCategoriesByLevels(Integer levels);
    List<Category> selectCategoryByChildren();
    List<Category> showCategoriesByParentId(Integer parent_id);
}
